package com.sdut.material.controller;


import com.sdut.material.pojo.vo.DemandVO;
import com.sdut.material.service.IFactorService;
import com.sdut.material.service.IProductionService;
import com.sdut.material.util.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Yu
 * @since 2022-04-20
 */
@Controller
@RequestMapping("/factor")
public class FactorController {
    @Autowired
    private IFactorService factorService;
    @RequestMapping("/selectAllFactors")
    @ResponseBody
    public JSONResult selectAllFactors(Integer materialId,Integer demandCount) {
        DemandVO demandVO = new DemandVO();
        demandVO.setMaterialId(materialId);
        demandVO.setDemandCount(demandCount);
        JSONResult jsonResult = factorService.selectAllFactors(demandVO);
        return jsonResult;
    }
}

